package com.kx.springsecurity.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @ClassName MyBaseConfig
 * @Author Sun
 * @Date 2021/5/25 19:55
 */
@Configuration//配置声明当前是一个配置类,相当于说当前类就是 applicationContext.xml
public class MyBaseConfig {

    @Bean//相当于 xml 中的 bean 标签,方法名就是 id, 返回值类型就是 class
    public BCryptPasswordEncoder bCryptPasswordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
